﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MBS.UserControls.MovieUserControl;


namespace MBS
{
    public partial class Movie : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                AddMovieUserControl1.Actionresult.ToString();


            }

            AddMovieUserControl1.MovieAddComplete += new AddMovieUserControl.MovieAddHandler(AddMovieUserControl1_MovieAddComplete);
            AddMovieUserControl1.MovieAddFailed += new AddMovieUserControl.MovieAddHandler(AddMovieUserControl1_MovieAddFailed);
        }

        void AddMovieUserControl1_MovieAddFailed()
        {
            string x = "Movie Added Failed";

            ClientScript.RegisterStartupScript(this.GetType(), "sad", "javascript:showAlert('" + x + "')", true);
        }

        private void AddMovieUserControl1_MovieAddComplete()
        {
            string x = "Movie Added Successfully";

            ClientScript.RegisterStartupScript(this.GetType(), "sad", "javascript:showAlert('" + x + "')", true);

        }

    }
}